#include "dxres.h"

#pragma once

using Microsoft::WRL::ComPtr;
using namespace D2D1;


class IRender
{
public:
	IRender(const dxres& res) :
		m_res(res)
	{
	}

	virtual void Render()
	{
	}

	virtual void CreateDeviceIndependentResources()
	{
	}

	virtual void CreateDeviceResources()
	{
	}

	virtual void CreateDeviceSizeResources(float width, float height)
	{
	}

	virtual void ReleaseDeviceSizeResources()
	{
	}

	virtual void ReleaseDeviceResources()
	{
	}

	virtual void ReleaseDeviceIndependentResources()
	{
	}

	virtual LRESULT MessageHandler(UINT const message, WPARAM const wparam, LPARAM const lparam)
	{
		return 0;
	}

	bool IsDeviceCreated()
	{
		return m_res.target;
	}

protected:
	const dxres& m_res;
};